<?php foreach ($news_content->result() as $key => $val ): ?>
    <li>
        <a class="flex" href="<?php echo site_url('home/home/noticeDetail/'.$val->id);?>">
            <?php if (!empty($val->image)): ?>
                <?php $i=1;foreach (explode('|', $val->image) as $key => $value): ?>
                    <?php if($i==2) break;?>
                    <?php if (!empty($value)): ?>
                        <img src="<?php echo $this->config->show_image_url($value)?>">
                    <?php endif ?>
                <?php $i++;endforeach ?>
            <?php endif ?>
            <div class="content flex-1">
                <p><?php echo $val->title;?></p>
                <div class="details">
                    <span><em><?php echo $val->class_name;?></em><?php echo !empty($val->edit_time) ? time_tran(date("Y-m-d", $val->edit_time)) : time_tran(date("Y-m-d", $val->create_time));?></span>
                    <div class="number">
                        <i class="iconfont"></i>
                        <span><i class="iconfont">&#xe663;</i><?php echo $val->pv;?></span>
                    </div>
                </div>
            </div>
        </a>
    </li>
<?php endforeach ?>